window.onload = function () {
  var username = localStorage.getItem('username')
  var password = localStorage.getItem('password')
  var goHome = document.querySelector('.footer_guide_home')
  var goCategory = document.querySelector('.footer_guide_category')
  var goShopping = document.querySelector('.footer_guide_shopping')
  var mySelf = document.querySelector('.footer_guide_myself')
  goHome.addEventListener('click', function () {
    location.href = './Index.html'
  })
  goCategory.addEventListener('click', function () {
    location.href = './Category.html'
  })
  // goService.addEventListener('click',function(){
  //   location.href='./LoginBySecret.html'
  // })
  goShopping.addEventListener('click', function () {
    if (username == undefined || username == '' || username == null || password == undefined || password == '' || password == null){
      location.href = './LoginBySecret.html'
    }else{
    location.href = './Shopping.html'
    }
  })   
   console.log('usernmae',username)
    console.log('password',password)
  mySelf.addEventListener('click', function () {

    if (username == undefined || username == '' || username == null || password == undefined || password == '' || password == null)
      location.href = './LoginBySecret.html'
    else{
      location.href = './MySelf.html'
    }  
  })


}